#include <iostream>
#include <algorithm>
#include <climits>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define int long long

void solve()
{
    int n; cin >> n;
    vector<int> arr(n); for (auto& e : arr) cin >> e;
    for (int i = 0; i < n; ++i) {
        for (int j = i + 1; j < n; ++j) {
            if (arr[j] % arr[i] % 2 == 0) {
                cout << arr[i] << ' ' << arr[j] << endl;
                return;
            }
        }
    }
    cout << -1 << endl;
}

signed main()
{
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int t; cin >> t;
    while (t--) solve();
    return 0;
}